package com.example.mybatisdemo1.entity;

import com.example.mybatisdemo1.extend.Iphone;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

/**
 * @Author: xiaoqiang
 * @Description:
 * @Date: 2020/8/25
 * @Version: 1.0
 */
@JsonIgnoreProperties(value = {"handler"})
@ToString
@Data
public class UserPojo {


    int id;

    @Iphone
    String iphone;

    String name;
    String password;

    @Min(value = 10, message = "年龄不能小于10岁")
    @Max(value = 40, message = "年龄不能大于40")
    int age;

    Order order;

    //登陆时校验
    public interface login {
    }

    //注册时校验
    public interface regist {
    }

//    @Email(message = "输入正确的邮箱",groups = login.class)
    String email;

    Date birthday;

//    @Size(min = 1, message = "好友数量不能少于一个")
    List<Integer> fris;
}
